<template>
	<view class="sy">
		<image :src="animationUrl" mode="widthFix" class="fox"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				animationlist: [],
				animationUrl: ''
			};
		},
		onLoad() {
			this.getAnimationlist();
		},
		methods: {
			// 获取动画列表
			getAnimationlist() {
				let data = {
					appKey: this.appkey,
					appSecret: this.appSecret,
					uid: this.uid.toString(),
				}
				let sign = sort_ascii(data);
				sign = getMD5Screct(sign);
				data.signature = sign;
				uni.request({
					method: "POST",
					url: `${this.baseUrl}/api/ai/animationlist`,
					data: data,
					success: (res) => {
						const {
							data
						} = res.data;
						this.animationlist = data;
						this.animationUrl = data[0].image;
						setTimeout(() => {
							uni.navigateTo({
								url: "/pages/index/satart"
							})
						}, 2800)
					},
					fail: (err) => {
						console.log('请求失败_______________', err)
					}
				})

			},
		},
	};
</script>

<style lang="scss" scoped>
	.sy {
		height: 100vh;
		background-image: url("../../static/images/bg.png");
		background-size: 100% 100%;

		.fox {
			width: 50%;
			position: absolute;
			left: 25%;
			bottom: 30%;
			height: auto;
		}
	}
</style>
